<?php
class MenuCategory extends CWidget{
	public $_url = NULL;
	public $_catID = 0;
	public function init()
	{
		$dir = dirname(__FILE__).DIRECTORY_SEPARATOR.'assets';
		$this->_url = Yii::app()->getAssetManager()->publish($dir);
		$cs = Yii::app()->getClientScript();
		$cs->registerCssFile("{$this->_url}/css/vertical_menu.css");
		$cs->registerScriptFile("{$this->_url}/js/vertical_menu.js");
		parent::init();
	}
	public function run()
	{
		$CategoryRoot = FrontendShopCategoryModel::getCategory($this->_catID);
		$titleMenu = FrontendShopCategoryModel::model()->findByPk($this->_catID)->title;
		$this->render('default', array('url_images'=>$this->_url, 'CategoryRoot'=>$CategoryRoot, 'titleMenu'=>$titleMenu, 'ID'=>$this->_catID));
	}
}